﻿namespace TanzimSaqib.NoBrainer.Sample
{
    using DataAccess;
    using System.Web.Security;
    using System;
    using Controllers;

    public partial class PostView : ViewBase<PostController, Post>
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack) 
                return;

            Model.ID = int.Parse(Request.QueryString["ID"]);
            Model.UserId = (Guid)Membership.GetUser().ProviderUserKey;
             
            InvokeController(v => Controller.View(Model));
        }
    }
}